import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *


testCase="DBshop012_管理商品搜索商品"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,"商品管理","管理商品")
goods_name='美的'
firefox.find_element_by_name("goods_name").send_keys(goods_name)
firefox.find_element_by_xpath("//button").click()

try:
    firefox.find_element_by_xpath("//table/tbody/tr[2]/td[3]").text==goods_name
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)

